package com.itheima.springbootquickstart.controller;

import com.itheima.springbootquickstart.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ***
 * @version ***
 */
@RestController
public class EmailController {
    @Autowired
    private EmailService emailService;

    @RequestMapping("/send")
    public Boolean send() {
        String to = "1756303953@qq.com";
        String title = "test email";
        String content = "test content";

        boolean flag = emailService.send(to, title, content);
        return flag;
    }
}
